package com.peng.mapper;

import com.peng.pojo.Link;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface LinkMapper {
    //查询所有友情链接
    @Select("select * from tb_link")
    List<Link> selectAll();

    //添加
    int addLink(Link link);

    //修改
    int updateLink(Link link);

    @Delete("delete from tb_link where id = #{id}")
    int deleteLinkById(int id);
}
